import Vue from 'vue'
import Router from 'vue-router'
import Home from '@/pages/home/Home'
import City from '@/pages/city/City'
import Detail from '@/pages/detail/Detail'
import Job from '@/pages/job/Job'
import My from '@/pages/my/My'
import Company from '@/pages/company/Company'
import Talk from '@/pages/talk/Talk'
import Login from '@/pages/login/Login'
import Register from '@/pages/register/Register'
import User from '@/pages/user/User'
import Modify from '@/pages/modify/Modify'
import cDetail from '@/pages/cdetail/cDetail'








Vue.use(Router)

export default new Router({
  mode: 'history',
  routes: [
    {
      path: '/',
      name: 'Home',
      component: Home
    },
    {
      path: '/city',
      name: 'City',
      component: City
    },
    {
      path: '/detail',
      name: 'Detail',
      component: Detail
    },
    {
      path: '/job',
      name: 'Job',
      component: Job
    },
    {
      path: '/my',
      name: 'My',
      component: My
    },
    {
      path: '/company',
      name: 'Company',
      component: Company
    },
    {
      path: '/talk',
      name: 'Talk',
      component: Talk
    },
    {
      path: '/login',
      name: 'Login',
      component: Login
    },
    {
      path: '/register',
      name: 'Register',
      component: Register
    },
    {
      path: '/user',
      name: 'User',
      component: User
    },
    {
      path: '/modify/:msg',
      name: 'Modify',
      component: Modify
    },
    {
      path: '/cdetail/:company',
      name: 'cDetail',
      component: cDetail
    }
  ],
  scrollBehavior (to, from, savedPosition) {
    return { x: 0, y: 0 }
  }
})
